package com.xd.core.company.service;

import com.github.pagehelper.Page;
import com.xd.core.business.entity.OutInfo;
import com.xd.core.company.dto.*;
import com.xd.core.company.entity.Company;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xd.core.company.vo.*;

import java.util.List;

/**
 * <p>
 * 企业信息 服务类
 * </p>
 *
 * @author ZX
 * @since 2025-02-23
 */
public interface ICompanyService extends IService<Company> {

    void addCapitalUser(AddCapitalUserDto addCapitalUserDto) throws Exception;

    void addAgencyUser(AddAgencyUserDto addAgencyUserDto);

    void checkAgencyUser(CheckAgencyUserDto checkAgencyUserDto);

    GetCheckDetail getCheckDetail(Integer id);

    void againAddAgencyUser(AddAgencyUserDto addAgencyUserDto);

    boolean checkPhoneRepetition(String phone);

    void updateCapitalUser(AddCapitalUserDto addCapitalUserDto);

    Page<CompanyPageVo> getAgencyList(CompanyQuery companyQuery);

    CompanyAgencyVo getAgencyDetail(Integer id);

    Page<CompanyPageVo> getAgencyList1(CompanyQuery companyQuery);

    Page<CapitalPageVo> getCapitalList(CompanyQuery companyQuery);

    CompanyCapitalVo getCapitalDetail(Integer id);

    List<AgencyListVo> getCapitalAgencyList(Integer id);

    ConfigureRatesVo getConfigureRates(Integer id);

    CompanyVo getCompanyDetail(Integer id);
    /**
     * 收取服务费
     * @param type(收费类型)
     */
    void deductingBalanceMain(OutInfo outInfo,String incomingOrder,Integer incomingId,Integer debtId,String type,
                              Integer companyId, String amount, String client_trans_id);

    /**
     * 扣除产品服务费
     * @param outInfo
     */
    void deductingBalance(OutInfo outInfo);
    /**
     * 扣除公证书执行书服务费
     * @param incomingId
     */
    void deductingBalance1(Integer incomingId);
    /**
     * 扣除公证书服务费
     * @param outInfo
     */
    void deductingBalance2(OutInfo outInfo,String incomingOrder);
    /**
     * 扣除合同服务费
     * @param incomingId
     */
    void deductingBalance3(Integer incomingId);

    /**
     * 扣除放款服务费
     * @param
     */
    void deductingBalance4(OutInfo outInfo,String incomingOrder);
    /**
     * 扣除入金服务费
     *
     * @param companyId
     * @param client_trans_id
     */
    void deductingBalance5(Integer companyId, String amount, String client_trans_id);

    AgencyPreview getAgencyPreview();

    CompanyCapital getCapitalDetails(Integer id);

    void updateIncomingStatus(UpdateIncomingStatus updateIncomingStatus);

    /**
     * @description: 获取资方id和资方名称
     * @author: ZCH
     * @date: 2025/3/31 0031 11:15
     * @param: []
     * @return: java.util.List<com.xd.core.company.vo.CompanyInfoVo>
     **/
    List<CompanyInfoVo> getCapitals();

    List<CompanyInfoVo> getAllCompany();

    List<CompanyInfoVo> getAgents(Integer companyId);

    CompanyDetailVo getCapitalDetailPublic(Integer companyId);

    List<CompanyVo1> getCapitalsFinance();

    CompanyAgencyVo getPassAgencyList(Integer companyId);

    void exportCapitalList(CompanyQuery companyQuery, Integer id);

    void exportAgencyList(CompanyQuery companyQuery, Integer id);

    void exportUnCheckAgencyList(CompanyQuery companyQuery, Integer id);

    void updateWithholdSwitchStatus(UpdateWithholdSwitchStatus updateWithholdSwitchStatus);

    void addBloc(AddCapitalUserDto addCapitalUserDto);

    void updateBloc(AddCapitalUserDto addCapitalUserDto);

    Page<BlocPageVo> getBlocList(BlocQuery blocQuery);

    CompanyBloc getBloc(Integer id);

    List<CompanyCapitals> getBlocCapitals(Integer id);

    List<CompanyInfoVo> getInsuranceCompanys();

    void freezeAccount(FreezeAccountDto freezeAccountDto);
}
